libxl: band-aid for functions which return literal "-1"
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 26 Jan 2011 11:58:45 +0000 (11:58 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Wed, 26 Jan 2011 11:58:45 +0000 (11:58 +0000)
commita6998c944c4bbfc13804f20958953cdcd686f762
tree30423e69d850435284976f1e1699aa5f37b271dd
parentc80ed144feb3bcf697e13204207e6863f0e2b9b0
libxl: band-aid for functions which return literal "-1"

Many libxl functions erroneously return "-1" on error, rather than
some ERROR_* value.

To deal with this, invent a new ERROR_NONSPECIFIC "-1" which indicates
that "the function which generated this error code is broken".

Fix up the one we care about for forthcoming duplicate domain
detection (libxl_name_to_domid) and the others following the same
pattern nearby; leave the rest for post-4.1.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/libxl/libxl.h
tools/libxl/libxl_utils.c